﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using System.ServiceModel.Activation;
using NBFModel;
using NBFBLL;

namespace NBFWcfService
{
    // 注意: 如果更改此处的类名 "PassWordService"，也必须更新 Web.config 中对 "PassWordService" 的引用。
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
	public class PassWordService : IPassWordService
	{
        ChangePassWordBLL cpb = new ChangePassWordBLL();
        #region IPassWordService 成员

        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, Method = "POST")]
        public string DoWork(string str)
        {
            return str;
        }

        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, Method = "POST")]
        public string SetPassWord(NBFModel.Model_tb_ManagePwd mtm)
        {
            string str = cpb.SetPassWord(mtm.productNumber, mtm.UserPwd, mtm.NewPassWord, "");
            return str ;
        }

        #endregion
    }
}
